home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / gus / sdkdigv2.zip / SDKV2N8.TXT < prev    next >
Text File  |  1993-06-23  |  5KB  |  151 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. GUS Programmer's Digest     Thu Jun 10 00:07     Volume 2: Issue   8  
  7.  
  8. Today's Topics:
  9.                 GUS Programmer's Digest V2 #7 (2 msgs)
  10.                      SMPTE through audio in/out ?
  11.  
  12. Standard Info:
  13.     - Meta-info about the GUS can be found at the end of the Digest.
  14.     - Before you ask a question, please READ THE FAQ.
  15.  
  16. ----------------------------------------------------------------------
  17.  
  18. Date: Wed, 9 Jun 93 17:33:05 +0200
  19. From: d91-sme@nada.kth.se
  20. Subject: Re: GUS Programmer's Digest V2 #7
  21. Message-ID: <9306091533.AA29942@dront.nada.kth.se>
  22.  
  23. av@omega.ssw.de (Andreas Vogel) writes:
  24.  --------------------------------------
  25. >   I thought that this feature might help. But I really don't understand,
  26. >   how to "implement a ping-pong buffer algorithm" using this method.
  27. >   Does someone have an idea on this?
  28.  
  29. Is the problem this: you want to play a large sample that doesn't
  30. fit into the GUS memory?
  31.  
  32. Ok, let's write a picture:
  33.  
  34.            A piece of GUS memory:
  35.  -----------------------------------------------
  36.  ^                     ^                       ^
  37.  A                     B                       C
  38.  
  39. A = Start of Buffer #1
  40. B = Start of Buffer #2
  41. C = End of the buffers
  42.  
  43. 1. Fill A-C with sample data.
  44. 2. Play the sound from A to C, looping.
  45. 3. IRQ at B.
  46. 4. Fill A-B with new sample data.
  47. 5. IRQ at C.
  48. 6. Fill B-C with new sample data.
  49. 7. Go to 3.
  50.  
  51. Exactly how you create the IRQ's is actually uninteresting. Anyhow,
  52. you will not have any pops or anything with this algorithm.
  53.  
  54. I don't know if the following will work, but it's an idea:
  55.  
  56.  
  57.  
  58.      Piece of GUS memory:
  59.  ------------------------------
  60. ^                             ^
  61. A                             B
  62.  
  63. A = Start of buffer
  64. B = End of buffer
  65.  
  66. 1. Start DMA transfer from A to B.
  67. 2. Play the sound from A to B, looping bi-directionally.
  68. 3. IRQ at B.
  69. 4. Start DMA transfer from B to A.
  70. 5. IRQ at A.
  71. 6. Start DMA transfer from A to B.
  72. 7. Go to 3.
  73.  
  74. The crucial part is that the DMA-transfer must have started and transfered
  75. at least FC bytes/words before 1.6 ms after the generation of the IRQ, 
  76. (FC = frequency counter, the number of bytes/words the GUS will skip when
  77. playing the next data element in a sample.)
  78.  
  79. The whole idea builds upon the fact that DMA is faster than the GUS.
  80. Maybe it will work, maybe it won't. Has anybody tried this?
  81.  
  82. If it works you can simplify the code, and save processor time.
  83.  
  84. /Smedis (Niklas Smedberg, d91-sme@nada.kth.se)
  85.  
  86. ------------------------------
  87.  
  88. Date: Wed, 9 Jun 93 12:03:32 CDT
  89. From: eason@ncrnd3.StPaul.NCR.COM (Dale Eason)
  90. Subject: Re: GUS Programmer's Digest V2 #7
  91. Message-ID: <9306091703.AA04449@ncrnd3.StPaul.NCR.COM>
  92.  
  93. In regards to using two buffers I think this is the way to do it although I
  94. haven't tried it.
  95.  
  96. Load buffer a, load buffer b.
  97. Loop:
  98.   Enable interrupt on end of a.
  99.   Start a playing.
  100.   When interrupt is received. start a playing and enable interrupt on end of b.
  101.   Reload a.
  102.   When interrupt is received. Start b playing and enable interrupt on end of a.
  103.   reload b.
  104. End loop
  105.  
  106. There should be enough time when an interrupt is received to start the other
  107. buffer playing without hearing any delay or pops.  They say you can even start
  108. the loading of the buffer using DMA and then start the voice playing and the
  109. DMA will stay ahead of the voice playing.
  110.  
  111.  
  112.  
  113. The interrupt processing must be short enough that the new voice is started
  114. before the next sample needs to go out to the DAC.  This will keep pops from
  115. happening.
  116.  
  117. Dale
  118.  
  119. ------------------------------
  120.  
  121. Date: Wed, 9 Jun 93 09:29:26 -0400
  122. From: mas@elm.circa.ufl.edu (Mark Schneider)
  123. Subject: SMPTE through audio in/out ?
  124. Message-ID: <9306091329.AA05616@elm.circa.ufl.edu>
  125.  
  126. Has anyone though about the feasibility of implementing SMPTE through the
  127. GUS audio in and out jacks?  Imagine all the benefits!
  128.  
  129.  ---------------------------------------------------------------------------
  130. |    Mark Schneider            University of Florida           |
  131. |    mas@elm.circa.ufl.edu        904-335-6511 (voice)           |
  132.  ---------------------------------------------------------------------------
  133.  
  134. ------------------------------
  135.  
  136. End of GUS Programmer's Digest V2 #8
  137. ************************************
  138.  
  139. To post to tomorrow's digest:               <gus-sdk%itchy@dsd.es.com>
  140. To (un)subscribe or get help:       <gus-sdk-request%itchy@dsd.es.com>
  141. To contact a human (last resort):     <gus-sdk-owner%itchy@dsd.es.com>
  142.  
  143. FTP sites:         archive.epas.utoronto.ca         pub/pc/ultrasound
  144.                    wuarchive.wustl.edu       systems/msdos/ultrasound
  145. Hints:
  146.       - Get the FAQ from the FTP sites or the request server.
  147.       - Mail to <gus-sdk-request%itchy@dsd.es.com> for info about
  148.     other GUS related mailing lists (UNIX, OS/2, GUS-MIDI, etc.)
  149.  
  150.  
  151.